package com.hhkj.study.admin.teacher.excel;

import com.hhkj.study.admin.resource.excel.BaseExcelRes;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @Author luowu
 * @Date 2024/9/10 涵 17:22:43
 */
@Data
public class TeacherExcelRes extends BaseExcelRes {
    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空")
    @Excel(name = "姓名", width = 15, needMerge = true, require = true)
    private String name;
    /**
     * 标签,多个用|隔开
     */
    @Excel(name = "标签", width = 15, needMerge = true, type = Excel.Type.EXPORT)
    private String tagContent;

    /**
     * 授课范围
     */
    @Excel(name = "授课范围", width = 15, needMerge = true, type = Excel.Type.EXPORT, combo = {"一级建造师", "二级建造师"})
    private String teachScopeContent;
    /**
     * 学历
     */
    @NotBlank(message = "学历不能为空")
    @Excel(name = "学历", width = 15, needMerge = true, combo = {"高中", "本科", "硕士", "博士"}, require = true)
    private String academic;
    /**
     * 介绍
     */
    @NotBlank(message = "介绍不能为空")
    @Excel(name = "介绍", width = 15, needMerge = true, require = true)
    private String introduce;
    /**
     * 头像
     */
    @NotBlank(message = "头像不能为空")
    @Excel(name = "头像", width = 15, needMerge = true, require = true)
    private String avatarPicUrl;
    /**
     * 是否推荐首页0-否1-是
     */
    @Excel(name = "是否推荐首页", width = 15, needMerge = true, readConverterExp = "0=否,1=是", combo = {"是","否"})
    private Integer recommendFlag;

    @Override
    public String getSheetName() {
        return "老师导入模板";
    }

    @Override
    public String getTitle() {
        return "老师导入模板\n" +
                "1、表格时间格式统一为“yyyy-MM-dd”\n" +
                "2、上传时请确保excel单元格格式统一为文本\n" +
                "3、表头红色加粗为必填字段";
    }
}
